/*
这两个文件不能同时编译
interface/protocal-ocid-for-old.c 面向工厂模式，需要上层先调用fpga_open_interface
interface/protocal-ocid-for-old-trk300.c 没用使用函数指针
他们是过度
*/
#include "port.h"
#include "fpga-common.h"
#include "interface/protocal-ocid.h"

// 正式产品要把这个东西删掉，现在没空让小胡改fpga_open_interface()代替// 正式产品要把这个东西删掉，现在没空让小胡改fpga_open()

// int fpga_alarm(struct fpga_dev *dev, int ch, int is_appear)
// {
// 	// OTDR_ALARM_APPEAR
// 	// printf("作废%s() 用fpga_gpio()代替\r\n", __FUNCTION__);
// 	return 0;
// }


int fpga_ocid_param(struct fpga_dev *dev, struct fpga_test_param *val)
{
    // printf("%s() \r\n", __FUNCTION__);
    return cp_fpga_ocid_param(dev, (struct fpga_ocid_test_param *)val);
}

int fpga_ocid_start(struct fpga_dev *dev)
{
    // printf("%s() \r\n", __FUNCTION__);
    return cp_fpga_ocid_start(dev);
}

int fpga_read_ocid_data(
	struct fpga_dev *dev,
	unsigned char   *ocid_data,
	unsigned long    len,
	unsigned long   *rlen)
{
    return cp_fpga_read_ocid_data(dev, ocid_data, len, rlen);
}


int fpga_ocid_stop(struct fpga_dev *dev)
{
    return cp_fpga_ocid_stop(dev);
}

int fpga_ocid_sensitive(struct fpga_dev *dev, int sensitive)
{
    rm_cp_fpga_ocid_sensitive(dev, sensitive);
}
